1. Field of the Invention
The present invention relates to an image connecting method, an image connecting apparatus, and a storage medium on which an image connecting program is stored, for connecting first and second images to each other in such a manner that a particular connecting area is determined for the first and second images and the first and second images are combined together in the connecting area.
2. Description of the Related Art
When first and second signals are given, for example, as shown in FIG. 13, one known technique of creating a third signal which smoothly connects the former two signals is to calculate the weighted sum. A specific method of connecting signals based on this weighting addition is disclosed for example in a paper entitled xe2x80x9cA Multiresolusion Spline With Application to Image Mosaicsxe2x80x9d (Peter J. Burt, ACM Transaction on Graphics, Vol. 2, No. 4, October, 1983, pp. 217-236).
In the signal connecting technique disclosed in the paper cited above, first and second signals are connected in a particular area which is variable depending on frequency components. More specifically, the first and second signals are connected in a narrow connection area for high-frequency components, while the first and second signals are connected in a wide connection area for low-frequency components. Furthermore, in this technique disclosed in the above paper, weighted sums are calculated for respective frequency components to connect the first and second signals.
The method of connecting first and second signal at a particular frequency (for example xcfx89)) according to this technique is described below with reference to FIG. 14.
In FIG. 14, A(t) denotes a function representing a frequency component of the first signal at frequency xcfx89. B(t) denotes a function representing a frequency component of the second signal at frequency xcfx89. The components of the first and second signals at frequency xcfx89 are connected to each other in the connecting range of t=xe2x88x92T to T. As described above, the connecting range varies depending on the frequency xcfx89.
A third signal, via which the frequency component A(t) of the first signal at frequency xcfx89 and the frequency component B(t) of the second signal at frequency xcfx89 are connected, is determined over the connecting range such that the third signal has a frequency component C(t) given by the following equation:
xe2x80x83C(t)={1xe2x88x92xcex1(t)}xc3x97A(t)+a(t)xc3x97B(t)
where xcex1(t) is a monotonically increasing function which has a value 0 at t=xe2x88x92T and 1 at t=T. Herein, C(t) is defined within the connecting range from t=xe2x88x92T to T.
The overall signal D(t) resulting from the connection of the components at frequency xcfx89 becomes as follows:
D(t)=A (t) for txe2x89xa6xe2x88x92T,
D(t)=C (t) for xe2x88x92T less than t less than T, and
D(t)=B (t) for T less than t.
The method of connecting the first and second signals has been described above for the particular component at frequency xcfx89. In the technique disclosed in the above-cited paper, a similar calculation is performed for all frequency components and resultant signals are all added together to obtain a final result representing a connected signal.
In this signal connecting technique, as can be seen from the above discussion, DC components (components at an extremely low frequency) are connected to each other via a gradually varying signal in a wide connecting range thereby preventing a conspicuous abrupt change which would appear if the connection were performed in a narrow connecting range. On the other hand, high-frequency components are connected to each other in a narrow connecting range via a signal efficiently generated from the original first and second signals A(t) and B(t).
Although the signal connecting method has been described above with reference to an one-dimensional signal, this signal connecting method can also be applied to a two-dimensional signal such as an image signal.
The above-described signal connecting method is discussed further for the case where the signal connecting method described above is used to connect images including a large number of parts having extremely different aspect ratios, as is the case in an image of hairs.
For example, let us assume that a first image 101 including a plurality of hairs as shown in FIG. 15A and a second image 102 including, as shown in FIG. 15B, a plurality of hairs different from those of the first image 101 are connected to each other such that these two images are overlapped in a particular connecting area and a third image 103 is generated as shown in FIG. 15C.
In this connecting process, the first image 101 and the second image 102 are decomposed into frequency components and connecting ranges are determined for the respective frequency components. For high-frequency components, a narrow connecting range is set near the center within the maximum connecting range and the weighted sum of the frequency components is calculated over this narrow range so that the first and second images 101 and 102 are connected to each other via the signal given by the resultant weighted sum. For low-frequency components, a connecting range occupying a wider range within the maximum connecting range is set and the weighted sum of the frequency components is calculated over this wide connecting range so that the first and second images 101 and 102 are connected to each other via the signal given by the resultant weighted sum.
The resultant frequency components are all added together so as to create a third image 103 which is an overall image in which the first image 101 and the second image 102 are combined. Although only two ranges, that is, a xe2x80x9cnarrow connecting rangexe2x80x9d for a high-frequency component and a xe2x80x9cwide connecting rangexe2x80x9d for a low-frequency component are shown in FIG. 15C, various ranges for middle frequency components are set in addition to the above two ranges, in a practical connecting process.
Now, let us assume that the plurality of hairs in the first image 101 include one conspicuous hair 104. Herein, the xe2x80x9cconspicuous hairxe2x80x9d refers to such a hair having a conspicuous edge caused by peculiar illumination or reflection of light. Such a conspicuous hair 104 includes a lot of high-frequency components.
For the conspicuous hair 104, the connection between the first image 101 and the second image 102 is performed in a narrow range because it includes a lot of high-frequency components. As a result, in the resultant combined third image 103, the conspicuous hair 104 disappears near the center of the connecting range as shown in FIG. 15C.
Herein, let us assume that the plurality of hairs in the second image 102 also include one conspicuous hair 105. This conspicuous hair 105 also include a lot of high-frequency components.
Also for the conspicuous hair 105 including such a lot of high-frequency components, the first image 101 and the second image 102 are connected to each other in a narrow range, and thus the conspicuous hair 105 in the resultant combined third image 103 disappears near the connecting range as shown in FIG. 15C.
Thus, in the resultant third image 103 obtained by connecting the two images of hairs overlapped in the particular range, conspicuous hairs such as a hair 104 extending from the left disappear near the center and conspicuous hairs such as a hair 105 extending from the right also disappear near the center. As a result, the third image 103 becomes unnatural in that there is no hair extending across the central area.
As described above, when a conspicuous object such as a hair is included in both images to be connected, if the two images are connected to each other according to the above signal connecting technique, the resultant image becomes unnatural in that the conspicuous object disappears near the center of the connecting area.
Now, let us assume that the first image 101 is a blurred image of hairs and that the second image 102 is a high-density image of hairs. If these two images are connected into a third image 103, the third image 103 becomes unnatural in that the left-side part is a blurred image and the right-side part is a high-resolution image.
As described above, if two signals having different resolutions are connected to each other using the above-described conventional signal connecting technique, the resultant image becomes unnatural.
Another problem is that there is no available storage medium storing a processing program used by a computer to perform a signal connecting process.
In view of the above, it is an object of the present invention to provide an image connecting method, an image connecting apparatus, and a storage medium on which an image connecting program is stored, for connecting first and second images to each other in such a manner that a particular connecting area is determined for the first and second images and the first and second images are combined together in the connecting area into a natural image including no unnatural parts.
According to an aspect of the present invention, there is provided a method of connecting first and second images to each other, the method comprising: a connection step in which particular connecting areas are determined for the first image and the second image and then the first and second images in the connecting areas are combined together thereby connecting the first and second images to each other; a selection step for selecting a partial image of the first image; and an overwrite step for extracting the selected partial image from the first image and overwriting the extracted partial image on a connecting part produced in the connection step.
According to another aspect of the present invention, there is provided an image connecting apparatus for connecting a first image and a second image to each other, the apparatus comprising: connection means by which particular connecting areas are determined for the first image and the second image and then the first and second images in the connecting areas are combined together thereby connecting the first and second images to each other; selection means for selecting a partial image of the first image; and overwrite means for extracting the selected partial image from the first image and overwriting the extracted partial image on the connecting part produced by the connection means.
According to still another aspect of the present invention, there is provided an information providing medium for providing an image connecting program for connecting a first image and a second image to each other, the image connecting program comprising: a connection process in which particular connecting areas are determined for the first image and said second image and then said first and second images in the connecting areas are combined together thereby connecting the first and second images to each other; a selection process for selecting a partial image of the first image; and an overwrite process for extracting the selected partial image from the first image and overwriting the extracted partial image on the connecting part produced in the connection process.